<link rel="stylesheet" href="../core/resource/weui/weui.css?v=12">
<style>
</style>
<div class="weui_btn_area" >		
		 <div class="title">选择时间和数量</div>
</div>	
<div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">选择时间和数量</div>
		<div class="fui-header-right"></div>
</div>
<div class="weui_cells weui_cells_form">
		 		
		<div class="weui_cell">
                <div class="weui_cell_hd"><label for="" class="weui_label">出发地点</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.info.start" type="text" value="" placeholder="" readonly>
                </div>
                <div class="weui_cell_ft">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
		</div>
		<div class="weui_cell">
                <div class="weui_cell_hd"><label for="" class="weui_label">目的地</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.info.end" type="text" value="" placeholder="">
                </div>
                <div class="weui_cell_ft">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
		</div>
				
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">联系人</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.info.name" placeholder="请输入联系人">
                </div>
            </div> 
            <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">联系电话</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input"  type="text"  ng-model="pagedata.info.mobile" placeholder="请输入联系电话">
                </div>
            </div>
			<div class="weui_cell">
					<label class="col-xs-12 col-sm-3 col-md-2 left-label">选择出发时间</label>
					<div class="col-sm-4 col-xs-6"><input type="text" name="time" onchange="window.scope.pagedata.info.time=$(this).val()" ng-model="pagedata.info.time" placeholder="请选择日期时间" readonly="readonly" class="datetimepicker form-control" style="padding-left:12px;" /></div>
					
		</div>	
							
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">备注</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.info.remark" placeholder="请输入详细信息">
                </div>
            </div>
		<div class="form-group" >	
	
		</div>


			
</div>
<div class="weui_btn_area">
		 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="pagedata.pay()">提交</a>
</div>

</div>

<script type="text/javascript">
					require(["datetimepicker"], function(){
						$(function(){
								var option = {
									lang : "zh",
									step : 60,
									timepicker : true,
									closeOnDateSelect : true,
									format : "Y-m-d H:i"
								};
							$(".datetimepicker[name = 'time']").datetimepicker(option);
						});
					});
</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
	scope.pagedata.pay=function(){
	var params={
		data:{'num':scope.pagedata.info.num,'name':scope.pagedata.info.name,'mobile':scope.pagedata.info.mobile,'time':scope.pagedata.info.time,'way':scope.pagedata.info.way},
		op:'submit',
		callback:function(res){
			if(res.payid){
				require(['tool'],function(tool){
					tool.pay(res.payid,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','','jy_tour/order.list//status=1');
							
						}else{
							scope.message('支付失败！失败原因：'+res.message,'error');
						}
					});
				});
			}
		}
	};
	scope.post_json(params);

}
</script>